package com.cow.support.entity;

import java.io.Serializable;
import java.text.Collator;
import java.util.List;
import java.util.Locale;


/**
 * The persistent class for the resourceinfo database table.
 * 
 */

public class Resourceinfo implements Serializable,Comparable<Resourceinfo>{
	private static final long serialVersionUID = 1L;


	List<Resourceinfo> childList;
	
	private Integer resourceid;

	private Integer fatherId;

	private Integer hasChild;

	private Integer isTree;

	private String name;

	private Integer orderNo;

	private String resourcetype;

	private String subsidiary1;

	private String subsidiary2;

	private String subsidiary3;

	private String subsidiary4;

	private String subsidiary5;

	private String systemid;

	private String url;

	private Integer validFlag;

	public Resourceinfo() {
	}
	
	public boolean equals(Object o){
		if (!(o instanceof Resourceinfo)){
			return false;
		}
		Resourceinfo resource = (Resourceinfo)o;
		if(resource.getResourceid().equals(this.getResourceid())){
			return true;
		}
		return false;
	}
	@Override
    public int compareTo(Resourceinfo r) {
		Collator instance = Collator.getInstance(Locale.CHINA);
        return instance.compare(this.name, r.getName());
	}
	
	public int hashCode()
    {
        return this.getResourceid();
    }

	public Integer getResourceid() {
		return this.resourceid;
	}

	public void setResourceid(Integer resourceid) {
		this.resourceid = resourceid;
	}

	public Integer getFatherId() {
		return this.fatherId;
	}

	public void setFatherId(Integer fatherId) {
		this.fatherId = fatherId;
	}

	public Integer getHasChild() {
		return this.hasChild;
	}

	public void setHasChild(Integer hasChild) {
		this.hasChild = hasChild;
	}

	public Integer getIsTree() {
		return this.isTree;
	}

	public void setIsTree(Integer isTree) {
		this.isTree = isTree;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getOrderNo() {
		return this.orderNo;
	}

	public void setOrderNo(Integer orderNo) {
		this.orderNo = orderNo;
	}

	public String getResourcetype() {
		return this.resourcetype;
	}

	public void setResourcetype(String resourcetype) {
		this.resourcetype = resourcetype;
	}

	public String getSubsidiary1() {
		return this.subsidiary1;
	}

	public void setSubsidiary1(String subsidiary1) {
		this.subsidiary1 = subsidiary1;
	}

	public String getSubsidiary2() {
		return this.subsidiary2;
	}

	public void setSubsidiary2(String subsidiary2) {
		this.subsidiary2 = subsidiary2;
	}

	public String getSubsidiary3() {
		return this.subsidiary3;
	}

	public void setSubsidiary3(String subsidiary3) {
		this.subsidiary3 = subsidiary3;
	}

	public String getSubsidiary4() {
		return this.subsidiary4;
	}

	public void setSubsidiary4(String subsidiary4) {
		this.subsidiary4 = subsidiary4;
	}

	public String getSubsidiary5() {
		return this.subsidiary5;
	}

	public void setSubsidiary5(String subsidiary5) {
		this.subsidiary5 = subsidiary5;
	}

	public String getSystemid() {
		return this.systemid;
	}

	public void setSystemid(String systemid) {
		this.systemid = systemid;
	}

	public String getUrl() {
		return this.url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public Integer getValidFlag() {
		return this.validFlag;
	}

	public void setValidFlag(Integer validFlag) {
		this.validFlag = validFlag;
	}

	public List<Resourceinfo> getChildList() {
		return childList;
	}

	public void setChildList(List<Resourceinfo> childList) {
		this.childList = childList;
	}

}